matlab code of circular using linear